import javax.swing.plaf.ScrollBarUI;
import java.util.Scanner;

public class Test9 {
    public static void main(String[] args) {
      System.out.println("请输入金字塔层数：");
          Scanner row=new Scanner(System.in);
      int  n=row.nextInt();
    for (int i=1;i<=n;i++){
for (int j=0;j<=n-i;j++) {
    System.out.print(" ");
}
for (int k=1;k<=2*i-1;k++){
    System.out.print("*");
}
System.out.print("\n");
        }


    }
}
